package com.bocaizp.operation.mapper;

import com.bocaizp.pojo.DTO.CompanyDTO;
import com.bocaizp.pojo.DTO.JobDataDTO;
import com.bocaizp.pojo.VO.CompanyShowVO;
import com.bocaizp.pojo.VO.IndustryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Author : huang jie
 * Date : 2024/5/4 22:11
 **/
@Mapper
public interface CompanyMapper {

	/**
	 * 获取公司行业
	 * @return
	 */
	@Select("select name from job_industry")
	List<IndustryVO> getindustry();

	/**
	 * 获取公司列表
	 *
	 * @param companyDTO
	 * @return
	 */
	List<CompanyShowVO> getcompany(CompanyDTO companyDTO);

	/**
	 * 获取公司最火热的职位
	 *
	 * @param name
	 * @return
	 */
	@Select("select job, salary_top,salary_bottom,salary_month from job_data " +
			"where company = #{name} order by hot desc limit 0,1")
	JobDataDTO getHotJob(String name);
}
